package com.xiaoyu.user.controller;

import com.xiaoyu.user.model.Hello;
import com.xiaoyu.user.service.HelloService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * Comments：
 * Author：yuxin
 * Create Date：2017-03-20
 * Modified By：
 * Modified Date：
 * Why & What is modified：
 * Version：v1.0
 */

@RestController
@RequestMapping("/userinfo")
@Api(value = "user管理",description = "xiaoyu")
public class HelloController {
    @Autowired
    HelloService helloService;

    @ApiOperation(value = "增加一个user")
    @RequestMapping(value = "Hello",method = RequestMethod.POST)
    public int hello(@RequestBody Hello hello) {
        int num=helloService.insertUser(hello);
        return num;
    }
}
